import turtle

turtle.delay(0)
length = 30
side = 3
pen = turtle.Pen()

x = 0 # 横向坐标
y = 0 # 竖向坐标

while x < 10 and y < 10:
    print(x,y)
    pen.up()
    pen.goto(-200+40*x, 200-40*y)
    pen.down()
    for j in range(side):
        pen.left(360/side)
        pen.forward(length)
    
    x += 1
    if x == 10: # 10个换一行
        x = 0
        y += 1

turtle.done()